<template>
  <!-- 报告记录 -->
  <section>
    <el-tabs v-model="tabName" @tab-click="onTabClick">
      <el-tab-pane label="实验室报告" name="t0">
        <labReport :cureId="cureId"></labReport>
      </el-tab-pane>
      <el-tab-pane label="辅助检查报告" name="t1">
        <assistReport v-if="tab1" :cureId="cureId"></assistReport>
      </el-tab-pane>
      <el-tab-pane label="自带报告" name="t2">
        <selfReport v-if="tab2" :cureId="cureId"></selfReport>
      </el-tab-pane>
      <el-tab-pane label="量表结果" name="t3">
        <lbResult v-if="tab3" :patientId="patientId"></lbResult>
      </el-tab-pane>
    </el-tabs>
  </section>
</template>
<script>
export default {
  //必传
  props: ["cureId", "patientId"],
  components: {
    labReport: () => import("./_com/labReport.vue"),
    assistReport: () => import("./_com/assistReport.vue"),
    selfReport: () => import("./_com/selfReport.vue"),
    lbResult: () => import("./_com/lbResult.vue")
  },
  computed: {},
  data() {
    return {
      tabName: "t0",
      tab1: false,
      tab2: false,
      tab3: false
    };
  },
  mounted() {
    const th = this;
  },
  methods: {
    onTabClick() {
      const th = this;
      switch (th.tabName) {
        case "t0":
          break;
        case "t1":
          th.tab1 = true;
          break;
        case "t2":
          th.tab2 = true;
          break;
        case "t3":
          th.tab3 = true;
          break;
        case "t4":
          break;
      }
    }
  }
};
</script> 